<template>
    <div>
        <a-col :span="24">
            <a-form-model-item label="小程序APPID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="appId">
              <a-input v-model="model.appId" placeholder="请输入小程序APPID"  ></a-input>
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="小程序APPSECRET" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="appSecret">
              <a-input-password  v-model="model.appSecret" placeholder="请输入小程序APPSECRET"  ></a-input-password>
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="商户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mchId">
              <a-input v-model="model.mchId" placeholder="请输入商户编号"  ></a-input>
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="商户证书序列号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mchSerialNo">
              <a-input v-model="model.mchSerialNo" placeholder="请输入商户证书序列号"  ></a-input>
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="v3密钥" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="apiV3Key">
              <a-input-password v-model="model.apiV3Key" placeholder="请输入v3密钥"  ></a-input-password>
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="商户证书" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="privateKeyFile">
              <j-upload :bizPath="'payment'" v-model="model.privateKeyFile" placeholder="请上传商户证书"  ></j-upload>
            </a-form-model-item>
        </a-col>
        <!-- <a-col :span="24">
            <a-form-model-item label="支付通知" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentNotifyUrl">
              <a-input v-model="model.paymentNotifyUrl" placeholder="请输入支付通知"  ></a-input>
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="退款通知" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentNotifyUrl">
              <a-input v-model="model.paymentNotifyUrl" placeholder="请输入支付通知"  ></a-input>
            </a-form-model-item>
        </a-col> -->
    </div>
</template>

<script>
import JUpload from '@/components/jeecg/JUpload'
export default {
  name: 'WechatPayChannelForm',
  props:{
    value: String,
  },
  components: {
    JUpload
  },
  data() {
    return {
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
    }
  },
  watch: {
    value: {
      handler(val) {
        if (val) {
          this.model = JSON.parse(val);
        }
      },
      immediate: true
    }
  },
  methods:{
    handleSubmit(callback) {
      callback(this.model);
    }
  }
}
</script>

<style lang="scss" scoped>

</style>